wayland: xdg-activation: Don't assume there's a focus surface
authorGuido Günther <agx@sigxcpu.org>
Tue, 11 Jan 2022 19:21:55 +0000 (20:21 +0100)
committerGuido Günther <agx@sigxcpu.org>
Wed, 19 Jan 2022 07:57:10 +0000 (08:57 +0100)
commit4d741bac98f906796d61eebfb4f74f5b1cecb2b6
tree62c2e8900853668818997be4ca9b53c3822bce65
parentf2aed69f8740394fb2d0f799e4bd9f49b8e57c9c
wayland: xdg-activation: Don't assume there's a focus surface

Tools like gtk4-launch can't set surface on the activation token so
don't require it. If the compositor requires it we can't do anything
about it anyway. This avoids a critical:

   (gtk4-launch:23497): Gdk-CRITICAL **: 17:07:24.704: gdk_wayland_surface_get_wl_surface: assertion 'GDK_IS_WAYLAND_SURFACE (surface)' failed

Fixes: be4216e051 ("gdk/wayland: Support the xdg-activation wayland protocol")
Signed-off-by: Guido Günther <agx@sigxcpu.org>
gdk/wayland/gdkapplaunchcontext-wayland.c